<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="/resource/admin/css/admin.css" media="all" />
<link rel="stylesheet" type="text/css" href="/resource/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="/resource/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="/resource/lib/Hui-iconfont/1.0.9/iconfont.css" />
<script type="text/javascript" src="/resource/common/js/jquery-1.12.3.min.js"></script>
<script type="text/javascript" src="/resource/admin/plugs/layer/layer.js"></script>
<script type="text/javascript" src="/resource/admin/plugs/laydate/laydate.js"></script>
<script src="/resource/admin/js/initialization.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" src="/resource/admin/js/withdraw.js"></script>
<title>平台提现</title>
<style type="text/css">
.form-table th, .form-table td {
	border: 1px #eee solid;
	height: 50px;
	padding: 0 10px;
}
.form-table thead th {
	color: #555;
	font-weight: 600;
}
.form-table td:first-child {
	font-weight: 600;
	color: #666;
	text-align: right;
}
input,select,textarea {
	background-color: #fff;
	border-radius: 3px;
	border: 1px #ddd solid;
	height: 36px;
	max-width: 250px;
	padding: 0 10px;
}
.form-table td textarea {
	background-color: #fff;
	border-radius: 3px;
	border: 1px #ddd solid;
	height: 80px;
	min-width: 250px;
	padding: 0 10px;
}
.button {
	background: #1e9fff;
	height: 36px;
	padding: 5px 15px;
	border-radius: 4px;
	border: 0;
	color: #fff;
	font-weight: 600;
	font-size: 14px;
}
.form-table td span {
	margin-left: 10px;
	color: red;
}
.form-table tbody tr:hover {
	background-color: #f9f9f9;
}
</style>
</head>
<body>
	<nav class="breadcrumb">
		<i class="Hui-iconfont">&#xe67f;</i>首页
		<span class="c-gray en">&gt;</span>平台提现
		<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
			<i class="Hui-iconfont">&#xe68f;</i>
		</a>
	</nav>
	<div style="padding: 30px">
		<!-- 提现 -->
		<table width="100%" class="form-table">
			<thead>
				<tr align="center">
					<th colspan="2">
						<h4>提现</h4>
					</th>
				</tr>
			</thead>
			<tbody>
				<tr>
					<td>可用余额</td>
					<td>
						¥ {$balance.balance}
					</td>
				</tr>
				<tr>
					<td>冻结金额</td>
					<td>
						¥ {$balance.frozen_balance}
					</td>
				</tr>
				<tr>
					<td>提现金额</td>
					<td>
						<input type="text" name="price" value="" placeholder="请输入金额">
						<select name="card">
							<option value="">请选择银行卡</option>
							{if $bankList}
							{foreach $bankList as $key=>$value}
							<option value="{$value.id}">{$value.card_number} - {$value.card_name}</option>
							{/foreach}
							{/if}
						</select>
						<input type="password" name="pay_pwd" value="" placeholder="请输入交易密码">
						<button class="button withdraw_sub">提交</button>
					</td>
				</tr>
			</tbody>
		</table>
		<!-- 收付款管理 -->
		<table width="100%" class="form-table" style="margin:30px 0;">
			<thead>
				<tr align="center">
					<th colspan="9">
						<h4>提现记录</h4>
					</th>
				</tr>
				<tr>
					<th colspan="9">
						<form id="searchform" action="/admin/withdraw/index" method="get" style="margin:20px 30px;">
							订单号
							<input type="text" name="order_id" value="{if isset($where['order_id']) and $where['order_id']}{$where.order_id}{/if}">&nbsp;&nbsp;
							订单状态
							<select name="status">
								{foreach $withdrawStatus as $key=>$value }
								{if $key neq 6}
								<option value="{$key}"{if isset($where['status']) and $where['status'] eq $key} selected="selected"{/if}>{$value}</option>
								{/if}
								{/foreach}
							</select>&nbsp;&nbsp;
							创建日期
							<input type="text" name="datetime" value="{if isset($where.datetime) and $where.datetime}{$where.datetime}{/if}" style="width:300px;" readonly>&nbsp;&nbsp;
							<input type="submit" value="搜索" class="button"/>
						</form>
					</th>
				</tr>
				<tr align="center">
					<th>订单号</th>
					<th>创建时间</th>
					<th>金额</th>
					<th>订单状态</th>
					<!-- <th>支付方式</th> -->
					<th>银行</th>
					<th>卡号</th>
					<th>账号</th>
					<th>更新时间</th>
					<th>手续费</th>
				</tr>
			</thead>
			<tbody>
				{if $data}
				{foreach $data as $key=>$value}
				<tr>
					<td style="text-align: left;font-weight: normal;">{$value.order_number}</td>
					<td>{$value.time|date="Y-m-d H:i:s"}</td>
					<td>{$value.price}</td>
					<td>
						{switch $value.state}
							{case 1}成功{/case}
							{case 2}失败{/case}
							{case 3}处理中{/case}
							{default /}
						{/switch}
					</td>
					<!-- <td></td> -->
					<td>{$value.bank_id}</td>
					<td>{$value.card_number}</td>
					<td>{$value.card_name}</td>
					<td>{if $value.set_time}{$value.set_time|date="Y-m-d H:i:s"}{/if}</td>
					<td>{$value.fee}</td>
				</tr>
				{/foreach}
				{else /}
				<tr>
					<td colspan="8" style="text-align: center;font-weight: normal;color: #999">暂无数据</td>
				</tr>
				{/if}
			</tbody>
		</table>
		<div class="page">{$page|raw}</div>
	</div>
</body>
</html>